package com.k2data.k2app.mapper;

import com.k2data.k2app.domain.EventCond;
import com.k2data.k2app.domain.po.EventDevice;
import com.k2data.k2app.domain.po.EventFault;
import com.k2data.k2app.mybatis.mapper.K2Mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author lidong9144@163.com 17-3-20.
 */
@Mapper
@Repository
public interface EventFaultMapper extends K2Mapper<EventFault> {

    /**
     * 抽象成相同的事件模型
     */
    List<EventDevice> selectList(EventFault cond);

    List<EventFault> selectTypeCount(EventCond cond);

    @Select("SELECT DISTINCT event_type FROM event_fault")
    List<String> selectTypes();

}
